import { pushUrl } from "./config.js";
import Axios from "axios";


Axios.defaults.baseURL = pushUrl;

// export let InspectConditionDataForInpsectpush = (schoolId, date, cycle) => {
//     return (
//         Axios.post("InspectPush/getInspectConditionReport", {
//             schoolId: schoolId,
//             date: date,
//             cycle: cycle,
//         })
//     );
// }

// export let getInspectPlanByClassIdAndCycleApi = (school, classId, isMore, cycle) => {
//     return (
//         Axios.post("InspectPush/getInspectPlanByClassIdAndCycle", {
//             classId: classId,
//             schoolId: parseInt(school),
//             isMore: isMore,
//             cycle:cycle,
//         })
//     );
// }

export let InspectConditionDataForInpsectpush = (schoolId, date, cycle) => {
    return (
        Axios.post("weChatSystem/getInspectConditionReport", {
            schoolId: schoolId,
            date: date,
            cycle: cycle,
        })
    );
}

export let getInspectPlanByClassIdAndCycleApi = (school, classId, isMore, cycle) => {
    return (
        Axios.post("weChatSystem/getInspectPlanByClassIdAndCycle", {
            classId: classId,
            schoolId: parseInt(school),
            isMore: isMore,
            cycle:cycle,
        })
    );
}


// 判断是否有计划没有生成
export let getToDayInspectPlanApi = (date, cycle, schoolId) => {
    return (
        Axios.post("WeChat/weChatSystem/getToDayInspectPlan", {
            date: date,
            cycle: cycle,
            schoolId: schoolId,
        })
    );
}


// 生成计划
export let weChatInspectPlanRecoverApi = (date, cycle, schoolId) => {
    return (
        Axios.post("WeChat/weChatSystem/weChatInspectPlanRecover", {
            date: date,
            cycle: cycle,
            schoolId: schoolId,
        })
    );
}



